home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / share / perl5 / Mail / Mailer / qmail.pm next >
Encoding:
Text File  |  2008-07-29  |  562 b   |  23 lines

  1. # Copyrights 1995-2008 by Mark Overmeer <perl@overmeer.net>.
  2. #  For other contributors see ChangeLog.
  3. # See the manual pages for details on the licensing terms.
  4. # Pod stripped from pm file by OODoc 1.05.
  5.  
  6. use strict;
  7.  
  8. package Mail::Mailer::qmail;
  9. use vars '$VERSION';
  10. $VERSION = '2.04';
  11.  
  12. use base 'Mail::Mailer::rfc822';
  13.  
  14. sub exec($$$$)
  15. {   my($self, $exe, $args, $to, $sender) = @_;
  16.     my $address = defined $sender && $sender =~ m/\<(.*?)\>/ ? $1 : $sender;
  17.  
  18.     exec($exe, (defined $address ? "-f$address" : ()));
  19.     die "ERROR: cannot run $exe: $!";
  20. }
  21.  
  22. 1;
  23.